<!--
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<div class="ddp-layout-wrap page-datasource-detail">
<!--  <app-metadata-management-metadata-detail-header ></app-metadata-management-metadata-detail-header>-->
  <div class="ddp-type-contents2">
    <app-metadata-management-metadata-detail-top *ngIf="metadata"></app-metadata-management-metadata-detail-top>

    <div class="ddp-wrap-datadetail ddp-wrap-datacolumn">
      <!-- tab -->
      <div class="ddp-wrap-tab ">
        <ul class="ddp-ui-tab ddp-clear">
          <li
            (click)="changeTab('information')"
            [ngClass]="{'ddp-selected': tab === 'information'}">
            <a href="javascript:">{{'msg.metadata.metadata.detail.information' | translate}}</a>
          </li>
          <li
            (click)="changeTab('column-details')"
            [ngClass]="{'ddp-selected': tab === 'column-details'}">
            <a href="javascript:">{{'msg.metadata.metadata.detail.column-details' | translate}}</a>
          </li>
          <li
            (click)="changeTab('data-grid')"
            [ngClass]="{'ddp-selected': tab === 'data-grid'}">
            <a href="javascript:">{{'msg.metadata.metadata.detail.data-grid' | translate}}</a>
          </li>
          <!--
          <li
            (click)="changeTab('monitoring')"
            [ngClass]="{'ddp-selected': tab === 'monitoring'}">
            <a href="javascript:">{{'msg.metadata.metadata.detail.monitoring' | translate}}</a>
          </li>
          -->
          <li
            (click)="changeTab('lineage')"
            [ngClass]="{'ddp-selected': tab === 'lineage'}" *ngIf="showLineageTab">
            <a href="javascript:">{{'msg.metadata.metadata.detail.lineage' | translate}}</a>
          </li>
          <!--
          <li
            (click)="changeTab('dictionary')"
            [ngClass]="{'ddp-selected': tab === 'dictionary'}">
            <a href="javascript:">{{'msg.metadata.metadata.detail.dictionary' | translate}}</a>
          </li>
          -->
        </ul>
<!--  <a href="#" class="ddp-btn-bg ddp-config"><em class="ddp-icon-option"></em>Ingestion config.</a> -->
      </div>
      <!-- //tab -->
      <div class="ddp-wrap-tab-contents">
        <app-metadata-management-metadata-detail-information
            *ngIf="tab ==='information' && metadata"></app-metadata-management-metadata-detail-information>
        <metadata-grid-component *ngIf="tab === 'data-grid'"></metadata-grid-component>
        <app-metadata-detail-columnschema *ngIf="tab === 'column-details'" [isNameEdit]="isNameEdit" (chooseCodeTableEvent)="openCodeTable($event)" (chooseDictionaryEvent)="openDictionary($event)"></app-metadata-detail-columnschema>
        <app-metadata-detail-lineageview *ngIf="tab === 'lineage'" [isNameEdit]="isNameEdit" [metadataLoaded]="metadataLoaded" ></app-metadata-detail-lineageview>
      </div>
  </div>
</div>

<app-delete-modal (deleteConfirm)="deleteMetadata()"></app-delete-modal>

<!-- Add catalog component -->
<app-select-catalog></app-select-catalog>
<!-- //Add catalog component -->

<!-- Code table component -->
<app-choose-code-table (chooseComplete)="codeTableCompleteEvent($event)"></app-choose-code-table>
<!-- //Code table component -->

<!-- Column dictionary component -->
<app-choose-column-dictionary (chooseComplete)="dictionaryCompleteEvent($event)"></app-choose-column-dictionary>
<!-- //Column dictionary component -->
